package com.hsmw.api.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hsmw.api.mapper.HsmwConcreteInfoMapper;
import com.hsmw.api.mapper.HsmwConstructionPositionMapper;
import com.hsmw.api.vo.BeanUtilsPosition;
import com.hsmw.api.vo.ContructionPosionAndbatchPlantVO;
import com.hsmw.api.vo.PositionAndDriverVo;
import com.hsmw.api.vo.PositionAndVehicleVo;
import com.hsmw.common.base.BaseService;
import com.hsmw.domain.HsmwConcreteInfo;
import com.hsmw.domain.HsmwConstructionPosition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;

@Service
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HsmwConstructionPositionService extends BaseService<HsmwConstructionPositionMapper, HsmwConstructionPosition> {

    @Autowired
    private HsmwConstructionPositionMapper hsmwConstructionPositionMapper;

    public List<PositionAndVehicleVo> findPositionAndvehicleList(String orderId) {


        return hsmwConstructionPositionMapper.findPositionAndvehicleList(orderId);
    }

    public PositionAndDriverVo findPositionAndDriverList(String positionId) {

        return hsmwConstructionPositionMapper.findPositionAndDriverList(positionId);
    }

    public List<HsmwConstructionPosition> queryRecentPositionlist(HashMap param) {
        return hsmwConstructionPositionMapper.queryRecentPositionlist(param);
    }

    public List<HsmwConstructionPosition> selectConstructionList(HashMap param ) {
        return hsmwConstructionPositionMapper.selectConstructionList(param);

    }

    public void saveBeanPositionVo(BeanUtilsPosition beanUtilsPosition) {

        hsmwConstructionPositionMapper.saveBeanPositionVo(beanUtilsPosition);
    }
}
